﻿<%@ Page Language="C#" MasterPageFile="~/TrangQuanLy.master" AutoEventWireup="true" CodeFile="QuanLyDonDatHang.aspx.cs" Inherits="QuanLyDonDatHang" Title="Quản lý đơn đặt hàng" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
   <div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt">
        -&nbsp;&nbsp;&nbsp; Quản Lý Đơn Hàng</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div align="center" style="color: #5D7B9D;padding:10px;padding-top:20px"  >
   <b style="font-size:18pt">ĐƠN ĐẶT HÀNG</b> 
</div>
    <table align="center" style="text-align:center;padding:10px">
<tr>
<td style="text-align: center">
   <div style="padding-top:0px; text-align: left; padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
       <span style="color: #990000; font-weight: bold; font-style: italic">Kiểm tra thanh toán:</span>
    <asp:DropDownList ID="drpkiemtrathanhtoan" runat="server" AutoPostBack="True" 
        onselectedindexchanged="drpkiemtrathanhtoan_SelectedIndexChanged">
    </asp:DropDownList>
    </div>
</td>
</tr>
<tr>
<td>
 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="DonDHID" onrowcancelingedit="GridView1_RowCancelingEdit" 
        onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
        onrowdeleting="GridView1_RowDeleting" AllowPaging="True" 
        onpageindexchanging="GridView1_PageIndexChanging" PageSize="15" 
        Font-Size="10pt" >
        <PagerSettings  Mode="NumericFirstLast" FirstPageText="First" 
            LastPageText="Last" NextPageText="Next" PageButtonCount="3" 
            PreviousPageText="Previous" 
            FirstPageImageUrl="~/images/sq_br_first (1).png" 
            LastPageImageUrl="~/images/sq_br_last.png" />
        <Columns>
            <asp:TemplateField HeaderText="Don DH">
                <ItemTemplate>
                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("DonDHID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ngày đặt">
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("NgayDat") %>' 
                        Font-Size="10pt"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hình thức thanh toán">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("HinhThucThanhToan") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Địa chỉ giao hàng">
                <EditItemTemplate>
                    <asp:TextBox ID="txtdiachigiaohang" runat="server" 
                        Text='<%# Bind("DiaChiGiaoHang") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("DiaChiGiaoHang") %>' 
                        Width="200px"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ghi chú">
                <EditItemTemplate>
                    <asp:TextBox ID="txtghichu" runat="server" Text='<%# Bind("GhiChu") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("GhiChu") %>' 
                        Width="200px"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tình trạng đơn hàng">
                <EditItemTemplate>
                    <asp:DropDownList ID="drptinhtrangdonhang" runat="server">
                        <asp:ListItem>Chưa giao hàng</asp:ListItem>
                        <asp:ListItem>Đang giao hàng</asp:ListItem>
                        <asp:ListItem>Đã giao hàng</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("TinhTrangDonHang") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Thanh toán">
                <ItemTemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("KiemTraThanhToan") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:DropDownList ID="drpthanhtoan" runat="server">
                        <asp:ListItem Value="1">Chưa thanh toán</asp:ListItem>
                        <asp:ListItem Value="2">Đã thanh toán</asp:ListItem>
                        <asp:ListItem Value="3">Huỷ đơn hàng</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" 
                        NavigateUrl='<%# Eval("DonDHID","ChiTietDonDatHang.aspx?DonDHID={0}") %>' 
                        Font-Underline="False">Xem </asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ButtonType="Image" ShowDeleteButton="True" DeleteImageUrl="~/images/Deleteicon.png"   />
        </Columns>
        <PagerStyle BackColor="White" Font-Size="16px" HorizontalAlign="Center" 
            VerticalAlign="Middle" />
        <HeaderStyle BackColor="Black" ForeColor="White" />
    </asp:GridView>
</td>
</tr>
</table>

</asp:Content>

